/**
 * Created by aaa on 2017/8/1.
 */
module.exports = app => {
    app.get('/', app.controller.home.index);
    app.get('/news', app.controller.news.list);
    app.get('/user/:id',app.controller.user.info);
    app.get('/user/:id',app.controller.user.index);
    app.get('/user/add',app.controller.user.save);
    app.resources('posts', '/api/posts', app.controller.posts);
    app.get('/search',app.controller.routerlearn.queryParam);
    app.get('/user/:id/:name',app.controller.routerlearn.params);
    app.post('/form',app.controller.routerlearn.getform);
    app.resources('users', '/users', 'user');
    app.resources('books', '/books', 'book');
};